<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

Route::get('/', function () {
    return view('welcome');
});

// 后台
Route::get('/admin/index', "Admin\IndexController@index");

// 用户管理
Route::get('/admin/user/add', 'Admin\UserController@add');
Route::post('/admin/user/insert', 'Admin\UserController@insert');
Route::get('/admin/user/index', 'Admin\UserController@index');
Route::post('/admin/user/ajaxStatus', 'Admin\UserController@ajaxStatus');
Route::post('/admin/user/ajaxName', 'Admin\UserController@ajaxName');
Route::get('/admin/user/edit/{id}', 'Admin\UserController@edit');
Route::post('/admin/user/update', 'Admin\UserController@update');
Route::get('/admin/user/delete/{id}', 'Admin\UserController@delete');


//前台
// 页面的输入路径       控制器文件的路径
Route::get('/index/index', "Index\index\IndexController@index");

Route::get('/index/goods', "Index\index\GoodsController@goods");

Route::get('/index/huawei', "Index\index\HuaweiController@huawei");

Route::get('/index/rongyao', "Index\index\RongyaoController@rongyao");

Route::get('/index/pj', "Index\index\PjController@pj");